package dyyx;

import org.apache.lucene.demo.SearchFiles;

public class SearchMain {
	
	public static void main(String[] args) throws Exception {
		
		// System.out.println("hello,lucene");
		
		
		String indexPath = "/Users/dugang/work/lucene/";
		// String docsPath = "/Users/dugang/fun/hellocode/web/docs/";
		String q = "java";
		q = "aerospike";
		// 中文需要使用中文分析器
		q = "异常堆栈";
		q = "fastjson java";
		q = "contents:fastjson  AND contents:java";
		
		q = "fastjson  AND java";
		
		q = "aerospike AND java";

		// q = "aerospike AND redis AND hbase";

		
        // 字段   path modified contents
		String[] params = new String[]{"-index",indexPath,"-query",q ,"-raw"};
		params = new String[]{"-index",indexPath,"-query",q };
		
		// 调用官方demo 执行搜索
		SearchFiles.main(params);
		
		
	}
}
